package com.hjt.gulimall.cart.service;

import com.hjt.gulimall.cart.vo.Cart;
import com.hjt.gulimall.cart.vo.CartItem;

import java.util.List;
import java.util.concurrent.ExecutionException;

/**
 * @author:97007
 * @date:2021/10/1 9:46
 */
public interface CartService {
    // 将商品添加到购物车
    CartItem addToCart(Long skuId, Integer count) throws ExecutionException, InterruptedException;

    // 查看购物车项内容
    CartItem getCartItem(Long skuId);

    // 获取购物车信息
    Cart getCart() throws ExecutionException, InterruptedException;

    void checked(Long skuId, Boolean checked);

    // 获取
    List<CartItem> getCartItemList();
}
